package edu.cornell.cubooks.utils;

public class Santizer {
	public static String santize(String input) {
		if(input == null) { 
			return input;
		}
		String output = input;
		return	output
			.replaceAll("<", "&lt;").replaceAll(">", "&gt;")
			.replaceAll("eval\\((.*)\\)", "")
			.replaceAll("[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']", "\"\"")
			.replaceAll("script", "");
	}
}